<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>参考：https://codepen.io/Chokcoco/pen/oNyKOdq</title>
  </head>
  <link rel="stylesheet" href="../common.css" />
  <style>
    @import url(https://fonts.googleapis.com/css?family=Crimson+Text);
    @import url("https://fonts.googleapis.com/css2?family=Righteous&display=swap");
    body,
    html {
      width: 100%;
      height: 100%;
      display: flex;
      background: #000;
      overflow: hidden;
    }

    div {
      margin: auto;
      perspective: 2000px;
      transform-style: preserve-3d;
      font: 10vw Righteous;
      -webkit-animation: fade 8s infinite;
      animation: fade 8s infinite;
    }

    span {
      position: relative;
      display: inline-block;
      min-width: 0.5em;
      text-align: center;
      transform-style: preserve-3d;
      transform: rotateY(25deg);
      -webkit-animation: rotate 8s infinite ease-in;
      animation: rotate 8s infinite ease-in;
      color: black;
    }
    span:after,
    span:before {
      display: block;
      position: absolute;
      top: 0;
      left: 0;
      content: attr(class);
      color: #867862;
      z-index: -1;
      -webkit-animation: shadow 8s infinite;
      animation: shadow 8s infinite;
    }
    span:before {
      transform: translateZ(-14px);
    }
    span:after {
      transform: translateZ(-7px);
    }

    @-webkit-keyframes fade {
      from {
        transform: scale(1.2);
      }
      25% {
        opacity: 1;
      }
      100% {
        transform: scale(1);
      }
    }

    @keyframes fade {
      from {
        transform: scale(1.2);
      }
      25% {
        opacity: 1;
      }
      100% {
        transform: scale(1);
      }
    }
    @-webkit-keyframes rotate {
      from {
        transform: rotateY(60deg);
      }
      50%,
      100% {
        color: #746853;
        transform: rotateY(0deg);
      }
      100% {
        color: #867862;
      }
    }
    @keyframes rotate {
      from {
        transform: rotateY(60deg);
      }
      50%,
      100% {
        color: #746853;
        transform: rotateY(0deg);
      }
      100% {
        color: #867862;
      }
    }
    @-webkit-keyframes shadow {
      from {
        color: shade(#867862, 50%);
      }
      25% {
        color: #afa695;
      }
      50%,
      100% {
        color: tint(#867862, 100%);
      }
    }
    @keyframes shadow {
      from {
        color: shade(#867862, 50%);
      }
      25% {
        color: #afa695;
      }
      50%,
      100% {
        color: tint(#867862, 100%);
      }
    }
  </style>
  <body>
    <div>
      <span class="2">2</span>
      <span class="0">0</span>
      <span class="2">2</span>
      <span class="3">3</span>
    </div>
  </body>
</html>
